package com.cloudshop.service.user.controller;

import com.cloudshop.service.common.dto.RestControllerResult;
import com.cloudshop.service.user.entity.Users;
import com.cloudshop.service.user.service.UserService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * UserController.
 *
 * @author 宫新程
 * @since 2019/4/1 14:03
 */
@RestController
@RequestMapping("/user")
public class UserController {

  @Resource private UserService userService;

  /** 查询全部. */
  @GetMapping
  public RestControllerResult<List<Users>> findAll() {
    return RestControllerResult.success(userService.findAll());
  }

}
